<template>
  <div class="parent">
    <input-one :test="code"></input-one>
    <el-input v-model="param"
              style="width:20%"
              placeholder="请输入内容"></el-input>
    <ChildOne :code="code"
              :username="username"
              :param="param"
              :childOneText.sync="childOneText"
              :testThree="testThree">
    </ChildOne>

    <child-two :code="code"
               :username="username"></child-two>
    <div>
      当前的 childOneText：{{childOneText}}
    </div>
  </div>
</template>
<script>
import ChildOne from './vue-child-one.vue'
import ChildTwo from './vue-child-two.vue'
export default {
  name: 'QianduanxuexiVueParent',
  components: {
    ChildTwo,
    ChildOne
  },
  data () {
    return {
      code: 'A10001',
      username: 'A10002',
      param: '',
      childOneText: ''
    }
  },
  methods: {
    testOne () {
      console.log('parrent 的方法 one')
    },
    testTwo () {
      console.log('parrent 的方法 two')
    },
    testThree () {
      console.log('parrent 的方法 three')
    }
  }
}
</script>
